import java.io.IOException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.dom4j.io.SAXReader;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;

public class DomReader {
	public static void main( String[] args ) {
		// configure the document builder factory
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		factory.setValidating( false );
		//    factory.setNamespaceAware( false );
		//    factory.setXIncludeAware(false);
		
		try {
			// get a builder to create a DOM document
			DocumentBuilder builder = factory.newDocumentBuilder();

			// parse the damned document
			Document d = builder.parse( "C:\\Users\\Nissim\\s3\\workspace\\springapp\\war\\WEB-INF\\jsp\\test.jsp" );
			System.out.println( "the document: " + d.getChildNodes().item(0).getChildNodes().item(3).getChildNodes() );
		}
		catch( ParserConfigurationException pce ) {
			pce.printStackTrace();
		}
		catch( SAXException se ) {
			se.printStackTrace();
		}
		catch( IOException ioe ) {
			ioe.printStackTrace();
		}
	}
}